package com.hualan.sfzy.mapper;


import com.hualan.sfzy.model.entity.PsychologyTest;
import com.hualan.sfzy.model.entity.PsychologyTestClassify;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
* @author Ahao
* @description 针对表【psychology_test_classify】的数据库操作Mapper
* @createDate 2025-07-03 17:40:05
* @Entity com.hualan.domain.PsychologyTestClassify
*/
@Mapper
public interface PsychologyTestClassifyMapper extends BaseMapper<PsychologyTestClassify>{

    /*查出所有的分类名*/
    /*查出所有的分类名*/
    List<Map<String, Object>> selectAllClassifyName();

    /*根据id查询分类下的列表*/
    PsychologyTestClassify selectByClassifyId(Integer classifyId);

    /*根据分类名查询*/
    List<PsychologyTestClassify> selectByClassifyName(String classifyName);

    /*根据分类ID获取该分类下的测试总数量*/
    Integer countTestsByClassifyId(@Param("classifyId") Integer classifyId);


    /*根据分类ID获取该分类下的所有测试*/
    List<PsychologyTest> selectTestsByClassifyId(@Param("classifyId") Integer classifyId);

}
